solving trig equations on the interval 0 2pi